package com.vx.vxbug.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.vx.vxbug.dao.IUserDao;
import com.vx.vxbug.entities.User;

@Service
public class UserService {

	@Autowired
	private IUserDao userDao;

	public void registerUser(User b) {
		userDao.addUser(b);
	}

	public User getUserById(int id) {
		return userDao.getUserById(id);
	}

	public User getUserByLogin(String login) {
		return userDao.getUserByLogin(login);
	}

	public List<User> getAllUsers() {
		return userDao.getAllUsers();
	}
}
